package com.bps.zzant.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bps.zzant.dao.FileDAO;
import com.bps.zzant.model.ArtFile;

@Service
@Transactional

public class FileServiceImpl implements FileService {
	
	@Autowired
	FileDAO fileDAO;
		
	public FileDAO getFileDAO() {
		return fileDAO;
	}
	public void setFileDAO(FileDAO fileDAO) {
		this.fileDAO = fileDAO;
	}

	public void saveFile(ArtFile artFile){
		fileDAO.saveFile(artFile);
	}
	
	public List<ArtFile> getFileListByOrderId(int customerId, int orderId){
		return fileDAO.getFileListByOrderId(customerId, orderId);
	}
	
	public void deleteFile(ArtFile artFile){
		fileDAO.deleteFile(artFile);
	}	
	public ArtFile getFileById(int fileId){
		return fileDAO.getFileById(fileId);
	}
}
